<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/painting/qpaintengine_raster.cpp -->
<head>
  <title>Qt 4.3: QCustomRasterPaintDevice Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QCustomRasterPaintDevice Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QCustomRasterPaintDevice class is provided to activate hardware accelerated paint engines in Qtopia Core. <a href="#details">More...</a></p>
<pre> #include &lt;QCustomRasterPaintDevice&gt;</pre><p><b>This class is under development and is subject to change.</b></p>
<p>Inherits <a href="qpaintdevice.html">QPaintDevice</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qcustomrasterpaintdevice-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qcustomrasterpaintdevice.html#QCustomRasterPaintDevice">QCustomRasterPaintDevice</a></b> ( QWidget * <i>widget</i> )</li>
<li><div class="fn"/>virtual int <b><a href="qcustomrasterpaintdevice.html#bytesPerLine">bytesPerLine</a></b> () const</li>
<li><div class="fn"/>virtual QImage::Format <b><a href="qcustomrasterpaintdevice.html#format">format</a></b> () const</li>
<li><div class="fn"/>virtual void * <b><a href="qcustomrasterpaintdevice.html#memory">memory</a></b> () const</li>
</ul>
<ul>
<li><div class="fn"/>12 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QCustomRasterPaintDevice class is provided to activate hardware accelerated paint engines in Qtopia Core.</p>
<p>Note that this class is only available in <a href="qtopiacore.html">Qtopia Core</a>.</p>
<p>In <a href="qtopiacore.html">Qtopia Core</a>, painting is a pure software implementation. But starting with <a href="qtopiacore.html">Qtopia Core</a> 4.2, it is possible to add an accelerated graphics driver to take advantage of available hardware resources.</p>
<p>Hardware acceleration is accomplished by creating a custom screen driver, accelerating the copying from memory to the screen, and implementing a custom paint engine accelerating the various painting operations. Then a custom paint device (derived from the QCustomRasterPaintDevice class) and a custom window surface (derived from QWSWindowSurface) must be implemented to make <a href="qtopiacore.html">Qtopia Core</a> aware of the accelerated driver.</p>
<p>See the <a href="qtopiacore-accel.html">Adding an Accelerated Graphics Driver in Qtopia Core</a> documentation for details.</p>
<p>See also <a href="qrasterpaintengine.html">QRasterPaintEngine</a> and <a href="qpaintdevice.html">QPaintDevice</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QCustomRasterPaintDevice"></a>QCustomRasterPaintDevice::QCustomRasterPaintDevice ( <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3>
<p>Constructs a custom raster based paint device for the given top-level <i>widget</i>.</p>
<h3 class="fn"><a name="bytesPerLine"></a>int QCustomRasterPaintDevice::bytesPerLine () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the number of bytes per line in the framebuffer. Note that this number might be larger than the framebuffer width.</p>
<h3 class="fn"><a name="format"></a><a href="qimage.html#Format-enum">QImage::Format</a> QCustomRasterPaintDevice::format () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the format of the device's memory buffet.</p>
<p>The default format is <a href="qimage.html#Format-enum">QImage::Format_ARGB32_Premultiplied</a>. The only other valid format is <a href="qimage.html#Format-enum">QImage::Format_RGB16</a>.</p>
<h3 class="fn"><a name="memory"></a>void * QCustomRasterPaintDevice::memory () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns a pointer to the paint device's memory buffer, or 0 if no such buffer exists.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
